Package edu.uky.ai.path
Class Path
java.lang.Object
edu.uky.ai.path.Location
edu.uky.ai.path.Path
public class Path extends Location
A path is a sequence of
Locations that is defined by the last
location on the path.- Author:
- Stephen G. Ware
-
Field Details
-
Constructor Details
-
Path
Constructs a path with only a single given location.- Parameters:
first- the first location on the path
-
-
Method Details
-
toString
public java.lang.String toString() -
contains
Tests whether or not this path contains the given location.- Parameters:
location- the location to test- Returns:
- true if this location is part of this path, false otherwise
-
addToPath
Returns a new path with the given location added to the end.- Parameters:
last- the location to add to the end of the new path- Returns:
- a new path with the given location added to the end
-